/**
 * Learning Backbone -> Syncing Models with Views
 * 
 * @author: MPeg [marco(dot)pegoraro(at)gmail(dot)com]
 * 
 * This view listen for the form to be submitted and updates the model with form
 * data.
 * 
 */

define([ 'backbone', 'jquery','text!template/contact.html'

], function(Backbone, $,ContactTemplate

) {

	return Backbone.View.extend({

		tagName : "article",
		className : "contact-container",
		template : ContactTemplate,

		render : function() {
			var tmpl = _.template(this.template);

			$(this.el).html(tmpl(this.model.toJSON()));
			return this;
		}

	});

});